<?php /*a:7:{s:62:"E:\code\jiaoyou\application\admin\view\config\third_party.html";i:1598953789;s:57:"E:\code\jiaoyou\application\admin\view\public\header.html";i:1598939754;s:54:"E:\code\jiaoyou\application\admin\view\public\css.html";i:1598939754;s:53:"E:\code\jiaoyou\application\admin\view\public\js.html";i:1598939754;s:58:"E:\code\jiaoyou\application\admin\view\public\tophead.html";i:1598939754;s:57:"E:\code\jiaoyou\application\admin\view\public\footer.html";i:1598939753;s:57:"E:\code\jiaoyou\application\admin\view\public\bottom.html";i:1598939754;}*/ ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<title>后台系统</title>
<!--[if lt IE 9]>
<meta http-equiv="refresh" content="0;ie.html" />
<![endif]-->
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/css/font-awesome.min.css" />
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/css/animate.min.css" />
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/css/style.min.css" />
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/css/ffxiang.css" />
<link rel="shortcut icon" href="http://jiaoyou.com\/style/admin/img/favicon.ico">
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/js/jquery.min.js"></script>
<script type="text/javascript" src="http://jiaoyou.com\/style/admin/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="http://jiaoyou.com\/style/layui/layui.js"></script>
    <link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/layui/css/layui.css" />
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-12">
            <?php 
$controller=strtolower(request()->controller());
$action=strtolower(request()->action());
$adminCtegory=db('category')->where(['controller'=>$controller,'function'=>$action])->cache(_cache('db'))->find();
$admin = Session::get('admin', 'mmjtAdmin');

if ($admin['id'] != 1 && $admin['type'] != 1) {
  $auth_visit = Db::name('admin_type')->where(['id' => $admin['type']])->value('data');
  $auth_visit = json_decode($auth_visit, true);
}else{
  $auth_visit = Db::name('category')->column('id');
}
if($adminCtegory){
	$adminCtegoryTid=db('category')->where(['tid'=>$adminCtegory['id'],'hideright'=>1])->order('des asc,id asc')->cache(_cache('db'))->select();
}else{
  $adminCtegoryTid=[];
}
 ?>
<div class="">
	<?php if(is_array($adminCtegoryTid) || $adminCtegoryTid instanceof \think\Collection || $adminCtegoryTid instanceof \think\Paginator): $i = 0; $__LIST__ = $adminCtegoryTid;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;
  $get=$v['get'];
  $geturl=[]; 
  if($get){
    if(strstr($get,"|")){
      $tidexplode=explode("|",$get);
      foreach($tidexplode as $va){
        $geturl[$va]=input($va);
      }
    }else{
        $geturl[$get]=input($get);
    }
  }
  $geturl['url']='-1';
  $url=url($v['controller'].'/'.$v['function'],$geturl);
   if(in_array($v['id'],$auth_visit)): ?><a onclick="add('<?php echo htmlentities($url); ?>')" href="javascript:void(0);" class="btn btn-primary "><?php echo htmlentities($v['title']); ?></a><?php endif; ?>
  <?php endforeach; endif; else: echo "" ;endif; ?>
</div>
<script type="text/javascript">
function add(url){
        layer.open({
          type: 2,
          title: '提示',
          shadeClose: false,
          shade: 0.2,
          area: ['90%', '90%'],
          skin:'shangchuantup',
          shift:-1,
          content: url,
          scrollbar: false,
          moveType: 1,
          moveOut: true
        }); 
}
</script>
            <form class="form-horizontal" method="post">
                <div class="tabs-container">
                    <ul class="nav nav-tabs">
                        <li class="active">
                            <a data-toggle="tab" href="#tab-1" aria-expanded="false">OSS配置</a>
                        </li>
                        <li class="">
                            <a data-toggle="tab" href="#tab-2" aria-expanded="false">环信Im</a>
                        </li>
                        <li class="">
                            <a data-toggle="tab" href="#tab-3" aria-expanded="false">微信</a>
                        </li>
                        <li class="">
                            <a data-toggle="tab" href="#tab-4" aria-expanded="false">支付宝</a>
                        </li>
                        <li class="">
                            <a data-toggle="tab" href="#tab-5" aria-expanded="false">极光</a>
                        </li>
                        <li class="">
                            <a data-toggle="tab" href="#tab-6" aria-expanded="false">网易易盾</a>
                        </li>
                        <li class="">
                            <a data-toggle="tab" href="#tab-7" aria-expanded="false">IOS</a>
                        </li>
                    </ul>
                    <div class="tab-content">

                        <div id="tab-1" class="tab-pane active">
                            <div class="ibox-content">
                                <?php 
                                $oss = sysConfig('oss');
                                 ?>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">accessKeyId：
                                        <?php if($development_display): ?><br><span style="color: red;">oss[accessKeyId]</span><?php endif; ?></label>
                                    <div class="col-sm-9">
                                        <input type="text" name="oss[accessKeyId]" value="<?php if(isset($oss['accessKeyId'])): ?><?php echo htmlentities($oss['accessKeyId']); ?><?php endif; ?>"
                                        required="required" class="form-control" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">accessKeySecret：
                                        <?php if($development_display): ?><br><span
                                                style="color: red;">oss[accessKeySecret]</span><?php endif; ?>
                                    </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="oss[accessKeySecret]" value="<?php if(isset($oss['accessKeySecret'])): ?><?php echo htmlentities($oss['accessKeySecret']); ?><?php endif; ?>"
                                        required="required" class="form-control" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">endpoint：
                                        <?php if($development_display): ?><br><span style="color: red;">oss[endpoint]</span><?php endif; ?>
                                    </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="oss[endpoint]" value="<?php if(isset($oss['endpoint'])): ?><?php echo htmlentities($oss['endpoint']); ?><?php endif; ?>"
                                        required="required" class="form-control" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">bucket：
                                        <?php if($development_display): ?><br><span style="color: red;">oss[oss_bucket]</span><?php endif; ?>
                                    </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="oss[bucket]" value="<?php if(isset($oss['bucket'])): ?><?php echo htmlentities($oss['bucket']); ?><?php endif; ?>"
                                        required="required" class="form-control" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">securityToken：
                                        <?php if($development_display): ?><br><span style="color: red;">oss[securityToken]</span><?php endif; ?>
                                    </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="oss[securityToken]" value="<?php if(isset($oss['securityToken'])): ?><?php echo htmlentities($oss['securityToken']); ?><?php endif; ?>"
                                        required="required" class="form-control" />
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div id="tab-2" class="tab-pane">
                            <div class="ibox-content">
                                <?php 
                                $easemob = sysConfig('easemob');
                                 ?>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">app_key：
                                        <?php if($development_display): ?><br><span style="color: red;">easemob[app_key]</span><?php endif; ?>
                                    </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="easemob[app_key]" value="<?php if(isset($easemob['app_key'])): ?><?php echo htmlentities($easemob['app_key']); ?><?php endif; ?>"
                                        required="required" class="form-control" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">org_name：
                                        <?php if($development_display): ?><br><span style="color: red;">easemob[org_name]</span><?php endif; ?>
                                    </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="easemob[org_name]" value="<?php if(isset($easemob['org_name'])): ?><?php echo htmlentities($easemob['org_name']); ?><?php endif; ?>"
                                        required="required" class="form-control" />
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">app_name：
                                        <?php if($development_display): ?><br><span style="color: red;">easemob[app_name]</span><?php endif; ?>
                                    </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="easemob[app_name]" value="<?php if(isset($easemob['app_name'])): ?><?php echo htmlentities($easemob['app_name']); ?><?php endif; ?>"
                                        required="required" class="form-control" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">client_id：
                                        <?php if($development_display): ?><br><span style="color: red;">easemob[client_id]</span><?php endif; ?>
                                    </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="easemob[client_id]" value="<?php if(isset($easemob['client_id'])): ?><?php echo htmlentities($easemob['client_id']); ?><?php endif; ?>"
                                        required="required" class="form-control" />
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">client_secret：
                                        <?php if($development_display): ?><br><span
                                                style="color: red;">easemob[client_secret]</span><?php endif; ?>
                                    </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="easemob[client_secret]" value="<?php if(isset($easemob['client_secret'])): ?><?php echo htmlentities($easemob['client_secret']); ?><?php endif; ?>"
                                        required="required" class="form-control" />
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div id="tab-3" class="tab-pane">
                            <div class="ibox-content">
                                <div class="form-group-title">开放平台</div>
                                <?php 
                                $weChatOpen = sysConfig('wechat_open');
                                 ?>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">AppID:
                                        <?php if($development_display): ?>
                                        <br><span style="color: red;">wechat_open[app_id]</span>
                                        <?php endif; ?>
                                    </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="wechat_open[app_id]"  class="form-control" value="<?php echo htmlentities((isset($weChatOpen['app_id']) && ($weChatOpen['app_id'] !== '')?$weChatOpen['app_id']:"")); ?>" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">AppSecret:
                                        <?php if($development_display): ?>
                                        <br><span style="color: red;">wechat_open[app_secret]</span>
                                        <?php endif; ?>
                                    </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="wechat_open[app_secret]"  class="form-control" value="<?php echo htmlentities((isset($weChatOpen['app_secret']) && ($weChatOpen['app_secret'] !== '')?$weChatOpen['app_secret']:"")); ?>" />
                                    </div>
                                </div>

                                <div class="form-group-title">APP支付</div>
                                <?php 
                                $weChatPay = sysConfig('wechat_pay');
                                 ?>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">应用ID:
                                        <?php if($development_display): ?>
                                        <br><span style="color: red;">wechat_pay[appid]</span>
                                        <?php endif; ?>
                                        </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="wechat_pay[appid]"  class="form-control" value="<?php echo htmlentities((isset($weChatPay['appid']) && ($weChatPay['appid'] !== '')?$weChatPay['appid']:"")); ?>" />
                                        <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 微信开放平台审核通过的应用APPID（请登录open.weixin.qq.com查看，注意与公众号的APPID不同）</span>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">商户号:
                                        <?php if($development_display): ?>
                                        <br><span style="color: red;">wechat_pay[mch_id]</span>
                                        <?php endif; ?>
                                    </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="wechat_pay[mch_id]"  class="form-control" value="<?php echo htmlentities((isset($weChatPay['mch_id']) && ($weChatPay['mch_id'] !== '')?$weChatPay['mch_id']:"")); ?>" />
                                         </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">密钥key:
                                        <?php if($development_display): ?>
                                        <br><span style="color: red;">wechat_pay[key]</span>
                                        <?php endif; ?>
                                    </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="wechat_pay[key]"  class="form-control" value="<?php echo htmlentities((isset($weChatPay['key']) && ($weChatPay['key'] !== '')?$weChatPay['key']:"")); ?>" />
                                        <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> key为商户平台设置的密钥key</span>

                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">设置回调地址:</label>
                                    <div class="col-sm-9">
                                        <input type="text" readonly="readonly"  class="form-control" value="<?php echo config('app.wechat.pay.notify_url'); ?>" />
                                    </div>
                                </div>

                            </div>
                        </div>


                        <div id="tab-4" class="tab-pane">
                            <?php 
                            $alipay = sysConfig('alipay');
                             ?>
                            <div class="ibox-content">
                                <div class="form-group-title">APP支付</div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">app_id(开发平台应用id):
                                        <?php if($development_display): ?>
                                        <br><span style="color: red;">alipay[app_id]</span>
                                        <?php endif; ?>
                                    </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="alipay[app_id]"  class="form-control" value="<?php echo htmlentities((isset($alipay['app_id']) && ($alipay['app_id'] !== '')?$alipay['app_id']:"")); ?>" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">验签方式 (SIGN_TYPE)：
                                        <?php if($development_display): ?>
                                        <br><span style="color: red;">alipay[sign_type]</span>
                                        <?php endif; ?></label>
                                    <div class="col-sm-9">
                                        <div class="radio i-checks">
                                            <label><input type="radio" value="RSA" name="alipay[sign_type]"  <?php if(isset($alipay['sign_type']) && $alipay['sign_type']=='RSA'): ?>checked="checked"<?php endif; ?>/> RSA</label>
                                            <label><input type="radio" value="RSA2" name="alipay[sign_type]" <?php if(isset($alipay['sign_type']) && $alipay['sign_type']=='RSA2'): ?>checked="checked"<?php endif; ?> />RSA2</label>
                                            <!--<label><input type="radio" value="seven_csattle" name="file_store" <?php if(sysConfig('file_store') == 'seven_csattle'): ?>checked="checked"<?php endif; ?> /> 七牛</label>-->
                                        </div>
                                        <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 请选择正确的验证签名方式，否则支付宝支付不起作用(建议使用RSA2)</span>
                                    </div>
                                </div>


                                <div class="form-group">
                                    <label class="col-sm-2 control-label">支付宝公钥(PUBLIC_KEY)：
                                        <?php if($development_display): ?>
                                        <br><span style="color: red;">alipay[public_key]</span>
                                        <?php endif; ?></label></label>
                                    <div class="col-sm-2">
                                        <div class="input-group">
                                            <button type="button" class="layui-btn" id="public_key"><i class="layui-icon"></i>上传支付宝公钥</button>
                                        </div>
                                    </div>
                                    <div class="col-sm-8">
                                        <div class="input-group">
                                        <input type="text" name="alipay[public_key]" id="alipay_public_key"  readonly="readonly" class="form-control" value="<?php echo htmlentities((isset($alipay['public_key']) && ($alipay['public_key'] !== '')?$alipay['public_key']:'')); ?>"></div>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">应用私钥(PRIVATE_KEY)：
                                        <?php if($development_display): ?>
                                        <br><span style="color: red;">alipay[private_key]</span>
                                        <?php endif; ?></label>
                                    <div class="col-sm-2">
                                        <div class="input-group">
                                            <button type="button" class="layui-btn" id="private_key"><i class="layui-icon"></i>上传应用私钥</button>

                                        </div>
                                    </div>
                                    <div class="col-sm-8">
                                        <div class="input-group">
                                        <input type="text" name="alipay[private_key]"  readonly="readonly" id="alipay_private_key" class="form-control" value="<?php echo htmlentities((isset($alipay['private_key']) && ($alipay['private_key'] !== '')?$alipay['private_key']:'')); ?>">
                                        </div>
                                        </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">设置回调地址:</label>
                                    <div class="col-sm-9">
                                        <input type="text" readonly="readonly"  class="form-control" value="<?php echo config('app.alipay.pay.notify_url'); ?>" />
                                    </div>
                                </div>


                            </div>
                        </div>

                        <div id="tab-5" class="tab-pane">
                            <?php 
                            $jpush = sysConfig('jpush');
                             ?>
                            <div class="ibox-content">
                                <div class="form-group-title">推送</div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">AppKey
                                        <?php if($development_display): ?>
                                        <br><span style="color: red;">jpush[app_key]</span>
                                        <?php endif; ?>
                                    </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="jpush[app_key]"  class="form-control" value="<?php echo htmlentities((isset($jpush['app_key']) && ($jpush['app_key'] !== '')?$jpush['app_key']:"")); ?>" />
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">Master Secret
                                        <?php if($development_display): ?>
                                        <br><span style="color: red;">jpush[master_secret]</span>
                                        <?php endif; ?>
                                    </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="jpush[master_secret]"  class="form-control" value="<?php echo htmlentities((isset($jpush['master_secret']) && ($jpush['master_secret'] !== '')?$jpush['master_secret']:"")); ?>" />
                                    </div>
                                </div>



                            </div>
                        </div>

                        <div id="tab-6" class="tab-pane">
                            <?php 
                            $yidun = sysConfig('yidun');
                             ?>
                            <div class="ibox-content">
                                <div class="form-group-title">易盾公共参数</div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">产品秘钥 id:
                                        <?php if($development_display): ?>
                                        <br><span style="color: red;">yidun[secretId]</span>
                                        <?php endif; ?>
                                    </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="yidun[secretId]"  class="form-control" value="<?php echo htmlentities((isset($yidun['secretId']) && ($yidun['secretId'] !== '')?$yidun['secretId']:"")); ?>" />
                                        <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 产品秘钥 id ，在网易易盾创建产品时统一分配，产品标识</span>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">产品秘钥 secretKey:
                                        <?php if($development_display): ?>
                                        <br><span style="color: red;">yidun[secretKey]</span>
                                        <?php endif; ?>
                                    </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="yidun[secretKey]"  class="form-control" value="<?php echo htmlentities((isset($yidun['secretKey']) && ($yidun['secretKey'] !== '')?$yidun['secretKey']:"")); ?>" />
                                        <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 产品秘钥 id ，在网易易盾创建产品时统一分配，产品标识</span>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">接口版本号:
                                        <?php if($development_display): ?>
                                        <br><span style="color: red;">yidun[version]</span>
                                        <?php endif; ?>
                                    </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="yidun[version]"  class="form-control" value="<?php echo htmlentities((isset($yidun['version']) && ($yidun['version'] !== '')?$yidun['version']:"")); ?>" />
                                        <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 接口版本号，可选值 v1</span>
                                    </div>
                                </div>


                                <div class="form-group-title">验证</div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">活体检测 业务id:
                                        <?php if($development_display): ?>
                                        <br><span style="color: red;">yidun[living][businessId]</span>
                                        <?php endif; ?>
                                    </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="yidun[living][businessId]" class="form-control"   value="<?php if(isset($yidun['living']['businessId'])): ?><?php echo htmlentities($yidun['living']['businessId']); ?><?php endif; ?>" />
                                        <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 业务id ，在网易易盾创建产品时统一分配，业务标识</span>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">人脸对比 业务id:
                                        <?php if($development_display): ?>
                                        <br><span style="color: red;">yidun[face][businessId]</span>
                                        <?php endif; ?>
                                    </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="yidun[face][businessId]" class="form-control"   value="<?php if(isset($yidun['face']['businessId'])): ?><?php echo htmlentities($yidun['face']['businessId']); ?><?php endif; ?>" />
                                        <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 业务id ，在网易易盾创建产品时统一分配，业务标识</span>
                                    </div>
                                </div>

                            </div>
                        </div>


                        <div id="tab-7" class="tab-pane">
                            <?php 
                            $apple = sysConfig('apple');
                             ?>
                            <div class="ibox-content">
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">审核状态：
                                        <?php if($development_display): ?>
                                        <br><span style="color: red;">apple[status]</span>
                                        <?php endif; ?>
                                    </label>
                                    <div class="col-sm-9">
                                        <div class="radio i-checks">
                                            <label><input type="radio" value="1" name="apple[status]"  <?php if(isset($apple['status']) && $apple['status']==1): ?>checked="checked"<?php endif; ?> /> 启用</label>
                                            <label><input type="radio" value="0" name="apple[status]"  <?php if((isset($apple['status']) && $apple['status']==0) || !isset($apple['status'])): ?>checked="checked"<?php endif; ?> /> 禁用</label>
                                            <!--<label><input type="radio" value="seven_csattle" name="file_store" <?php if(sysConfig('file_store') == 'seven_csattle'): ?>checked="checked"<?php endif; ?> /> 七牛</label>-->
                                        </div>
                                    </div>
                                </div>


                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
     
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/js/content.min.js"></script>
    <link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/plugins/sweetalert/sweetalert.css" />
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/plugins/sweetalert/sweetalert.min.js"></script>
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/plugins/layer/layer.js"></script>
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/js/ffxiangIndex.js"></script>
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/js/common.js"></script>
</body>
</html>
<script type="text/javascript" src="http://jiaoyou.com\/style/admin/plugins/iCheck/icheck.min.js"></script>
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/plugins/iCheck/custom.css" />
<script type="text/javascript">
    $(document).ready(function () {
        $(".i-checks").iCheck({
            checkboxClass: "icheckbox_square-green",
            radioClass: "iradio_square-green",
        });
    });
</script>
<script>
    layui.use('upload', function(){
        var $ = layui.jquery
            ,upload = layui.upload;


        //指定允许上传的文件类型
        upload.render({
            elem: '#public_key'
            ,url: "<?php echo url('index/uploadKey', ['type' => 'public_key']); ?>" //改成您自己的上传接口
            ,accept: 'file' //普通文件
            ,field:'public_key'
            ,done: function(res){
                layer.msg(res.msg);
                if(res.code==200){
                    $('#alipay_public_key').val(res.result);
                }
            }
        });
        upload.render({
            elem: '#private_key'
            ,url:  "<?php echo url('index/uploadKey', ['type' => 'private_key']); ?>" //改成您自己的上传接口
            ,accept: 'file' //普通文件
            ,field:'private_key'
            ,done: function(res){
                layer.msg(res.msg);
                if(res.code==200){
                    $('#alipay_private_key').val(res.result);
                }
            }
        });

    });
</script>
<script type="text/javascript">
$(document).ready(function(){
    $("#button").click(function(){

      <?php 
      if((request()->controller()=='Article' && request()->action()=='add') || (request()->controller()=='Shop' && request()->action()=='add')){
       ?>

      var images='';
      <?php if(!empty($name)){ ?>
      $(".meiyouuimmag textarea").each(function(ret){
        var img=$(this).data('img');
        if(img){
          img_text=$(this).val();
          if(ret==0){
            images+='"'+img
          }else{
            images+=',"'+img
          }
        }
      });
      if(images){
        images="{"+images+"}";
        $('#images').val(images);
      }else{
        $('#images').val();
      }

      <?php }else{?>
       $(".meiyouuimmag textarea").each(function(ret){
        var img=$(this).data('img');
        if(img){
          img_text=$(this).val();
          if(ret==0){
            images+=''+img
          }else{
            images+=','+img
          }
        }
      });
      if(images){
        $('#images').val(images);
      }else{
        $('#images').val();
      }
        <?php }} 
if(input('?url')){
  echo 'loading("#button button")'."\r\n";
}
 ?>

        ajaxFun("POST","",$(".form-horizontal").serialize(),"json",function(ret){
            if(ret){
                if(ret.ret){
                    swal_msg(ret.ret,'',"success",<?php if(input('?url')){echo input('url');}else{echo 0;} ?>)
                    <?php 
if(input('?url')){
  echo 'loading("#button button",\'<i class="fa fa-check"></i> &nbsp;\'+ret.ret)';
}
 ?>

                    return false;
                }else{
                    layer.msg(ret.err)
                }
            }else{
                swal_msg("错误",ret,"error");
            }
            <?php 
if(input('?url')){
 ?>
loadingClose("#button button",'<i class="fa fa-check"></i> &nbsp;<?php if(isset($name)): ?>修改<?php else: ?>提交<?php endif; ?>')
<?php 
}
 ?>

        });
    });
});

function html2Escape(sHtml) {
 return sHtml.replace(/[<>&"]/g,function(c){return {'<':'&lt;','>':'&gt;','&':'&amp;','"':'&quot;'}[c];});
}
</script>
<style type="text/css">
.tbutton{ 
  position: fixed;
  bottom:0px;
  width: 100%;
  background: #fff;
  padding-top: 20px;
  padding-bottom: 20px;
  border-top: 1px solid #F5EFEF;
  z-index: 99999999999
}
#button{ width:120px; margin: 0 auto;}
.wrapper-content{ margin-bottom:75px;}
</style>

<div class="tbutton">
  <div id="button"><button class="btn btn-w-m btn-primary" type="button"><i class="fa fa-check"></i> &nbsp;<?php if(isset($name)): ?>修改<?php else: ?>提交<?php endif; ?></button></div>
</div>